package com.qufenqi.pay.abs.common.exception;

/**
 * Created by zhangdelong on 16/8/27.
 * P2P 定义的业务异常
 * */

public class BusinessException extends Exception{
    protected String errorCode;
    public BusinessException(ErrorCodeEnum errorCode) {
        this(errorCode.getCode(),errorCode.getMsg());
    }
    public String getErrorCode() {
        return this.errorCode;
    }

    public BusinessException() {
        super();
    }

    public BusinessException(String errorCode) {
        super();
        this.errorCode = errorCode;
    }

    public BusinessException(String errorCode, String errorMessage) {
        super(errorMessage);

        this.errorCode = errorCode;
    }

    public BusinessException(String errorCode, String errorMessage, Throwable cause) {
        super(errorMessage, cause);
        this.errorCode = errorCode;
    }

    public BusinessException(Throwable cause) {
        super(cause);
    }
}
